package com.snail.starter.mq.enums;

import com.snail.starter.commons.error.IErrorCode;
import lombok.Getter;

/**
 * @author: snail framework
 * @Date: 2023/7/4 15:20
 * @Version: 1.0.0
 */
@Getter
public enum MQStarterErrorCode implements IErrorCode {

    MISS_MESSAGE_PRODUCER(1, "缺少消息生产者策略"),
    NOT_MATCH_MESSAGE_PRODUCER(2, "不能匹配消息生产者"),
    ;
    private final Integer code;

    private final String defaultMessage;

    MQStarterErrorCode(Integer code, String defaultMessage){
        this.code = code;
        this.defaultMessage = defaultMessage;
    }

    @Override
    public Integer getCode() {
        return 99991000 + code;
    }

    @Override
    public String getDefaultMessage() {
        return defaultMessage;
    }

    @Override
    public String getBundleName() {
        return "mq-starter";
    }
}
